home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / MacWindows.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  21.4 KB  |  631 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        MacWindows.p
  3.  
  4.      Contains:    Window Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT MacWindows;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __MACWINDOWS__}
  28. {$SETC __MACWINDOWS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC MacWindowsIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MIXEDMODE__}
  38. {$I MixedMode.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __QUICKDRAW__}
  41. {$I Quickdraw.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __EVENTS__}
  44. {$I Events.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __CONTROLS__}
  47. {$I Controls.p}
  48. {$ENDC}
  49.  
  50.  
  51. {$PUSH}
  52. {$ALIGN MAC68K}
  53. {$LibExport+}
  54.  
  55. {
  56.   _________________________________________________________________________________________________________
  57.       
  58.    • WINDOW DEFINITION TYPE
  59.   _________________________________________________________________________________________________________
  60. }
  61.  
  62. CONST
  63.     kWindowDefProcType            = 'WDEF';
  64.  
  65. {
  66.   _________________________________________________________________________________________________________
  67.       
  68.    • WINDOW DEFINITION ID'S
  69.   _________________________________________________________________________________________________________
  70. }
  71.  
  72.     kStandardWindowDefinition    = 0;                            {  for document windows and dialogs }
  73.     kRoundWindowDefinition        = 1;                            {  old da-style window }
  74.     kFloatingWindowDefinition    = 124;                            {  for floating windows }
  75.  
  76. {
  77.   _________________________________________________________________________________________________________
  78.       
  79.    • VARIANT CODES
  80.   _________________________________________________________________________________________________________
  81. }
  82.  
  83.                                                                 {  for use with kStandardWindowDefinition  }
  84.     kDocumentWindowVariantCode    = 0;
  85.     kModalDialogVariantCode        = 1;
  86.     kPlainDialogVariantCode        = 2;
  87.     kShadowDialogVariantCode    = 3;
  88.     kMovableModalDialogVariantCode = 5;
  89.     kAlertVariantCode            = 7;
  90.     kMovableAlertVariantCode    = 9;                            {  for use with kFloatingWindowDefinition  }
  91.     kSideFloaterVariantCode        = 8;
  92.  
  93. {
  94.   _________________________________________________________________________________________________________
  95.       
  96.    • PROC-ID'S
  97.   _________________________________________________________________________________________________________
  98. }
  99.  
  100.     documentProc                = 0;
  101.     dBoxProc                    = 1;
  102.     plainDBox                    = 2;
  103.     altDBoxProc                    = 3;
  104.     noGrowDocProc                = 4;
  105.     movableDBoxProc                = 5;
  106.     zoomDocProc                    = 8;
  107.     zoomNoGrow                    = 12;
  108.     rDocProc                    = 16;                            {  floating window defproc ids  }
  109.     floatProc                    = 1985;
  110.     floatGrowProc                = 1987;
  111.     floatZoomProc                = 1989;
  112.     floatZoomGrowProc            = 1991;
  113.     floatSideProc                = 1993;
  114.     floatSideGrowProc            = 1995;
  115.     floatSideZoomProc            = 1997;
  116.     floatSideZoomGrowProc        = 1999;
  117.  
  118. {
  119.   _________________________________________________________________________________________________________
  120.       
  121.    • STANDARD WINDOW KINDS
  122.   _________________________________________________________________________________________________________
  123. }
  124.  
  125.     dialogKind                    = 2;
  126.     userKind                    = 8;
  127.     kDialogWindowKind            = 2;
  128.     kApplicationWindowKind        = 8;
  129.  
  130.  
  131. {
  132.   _________________________________________________________________________________________________________
  133.       
  134.    • FIND WINDOW RESULT CODES
  135.   _________________________________________________________________________________________________________
  136. }
  137.  
  138.     inDesk                        = 0;
  139.     inNoWindow                    = 0;
  140.     inMenuBar                    = 1;
  141.     inSysWindow                    = 2;
  142.     inContent                    = 3;
  143.     inDrag                        = 4;
  144.     inGrow                        = 5;
  145.     inGoAway                    = 6;
  146.     inZoomIn                    = 7;
  147.     inZoomOut                    = 8;
  148.  
  149.     wDraw                        = 0;
  150.     wHit                        = 1;
  151.     wCalcRgns                    = 2;
  152.     wNew                        = 3;
  153.     wDispose                    = 4;
  154.     wGrow                        = 5;
  155.     wDrawGIcon                    = 6;
  156.  
  157.     deskPatID                    = 16;
  158.  
  159. {
  160.   _________________________________________________________________________________________________________
  161.       
  162.    • WINDOW DEFINITION HIT TEST RESULT CODES ("WINDOW PART")
  163.   _________________________________________________________________________________________________________
  164. }
  165.  
  166.     wNoHit                        = 0;
  167.     wInContent                    = 1;
  168.     wInDrag                        = 2;
  169.     wInGrow                        = 3;
  170.     wInGoAway                    = 4;
  171.     wInZoomIn                    = 5;
  172.     wInZoomOut                    = 6;
  173.  
  174. {
  175.   _________________________________________________________________________________________________________
  176.       
  177.    • WINDOW COLOR PART CODES
  178.   _________________________________________________________________________________________________________
  179. }
  180.  
  181.     wContentColor                = 0;
  182.     wFrameColor                    = 1;
  183.     wTextColor                    = 2;
  184.     wHiliteColor                = 3;
  185.     wTitleBarColor                = 4;
  186.  
  187. {
  188.   _________________________________________________________________________________________________________
  189.    • WINDOW COLOR TABLE STRUCTURE
  190.   _________________________________________________________________________________________________________
  191. }
  192.  
  193.  
  194. TYPE
  195.     WinCTabPtr = ^WinCTab;
  196.     WinCTab = RECORD
  197.         wCSeed:                    LONGINT;                                {  reserved  }
  198.         wCReserved:                INTEGER;                                {  reserved  }
  199.         ctSize:                    INTEGER;                                {  usually 4 for windows  }
  200.         ctTable:                ARRAY [0..4] OF ColorSpec;
  201.     END;
  202.  
  203.     WCTabPtr                            = ^WinCTab;
  204.     WCTabHandle                            = ^WCTabPtr;
  205. {
  206.   _________________________________________________________________________________________________________
  207.    • WINDOWRECORD
  208.   _________________________________________________________________________________________________________
  209. }
  210.     WindowRecordPtr = ^WindowRecord;
  211.     WindowPeek                            = ^WindowRecord;
  212.     WindowRecord = RECORD
  213.         port:                    GrafPort;
  214.         windowKind:                INTEGER;
  215.         visible:                BOOLEAN;
  216.         hilited:                BOOLEAN;
  217.         goAwayFlag:                BOOLEAN;
  218.         spareFlag:                BOOLEAN;
  219.         strucRgn:                RgnHandle;
  220.         contRgn:                RgnHandle;
  221.         updateRgn:                RgnHandle;
  222.         windowDefProc:            Handle;
  223.         dataHandle:                Handle;
  224.         titleHandle:            StringHandle;
  225.         titleWidth:                INTEGER;
  226.         controlList:            ControlHandle;
  227.         nextWindow:                WindowPeek;
  228.         windowPic:                PicHandle;
  229.         refCon:                    LONGINT;
  230.     END;
  231.  
  232. {
  233.   _________________________________________________________________________________________________________
  234.    • CWINDOWRECORD
  235.   _________________________________________________________________________________________________________
  236. }
  237.     CWindowRecordPtr = ^CWindowRecord;
  238.     CWindowPeek                            = ^CWindowRecord;
  239.     CWindowRecord = RECORD
  240.         port:                    CGrafPort;
  241.         windowKind:                INTEGER;
  242.         visible:                BOOLEAN;
  243.         hilited:                BOOLEAN;
  244.         goAwayFlag:                BOOLEAN;
  245.         spareFlag:                BOOLEAN;
  246.         strucRgn:                RgnHandle;
  247.         contRgn:                RgnHandle;
  248.         updateRgn:                RgnHandle;
  249.         windowDefProc:            Handle;
  250.         dataHandle:                Handle;
  251.         titleHandle:            StringHandle;
  252.         titleWidth:                INTEGER;
  253.         controlList:            ControlHandle;
  254.         nextWindow:                CWindowPeek;
  255.         windowPic:                PicHandle;
  256.         refCon:                    LONGINT;
  257.     END;
  258.  
  259. {
  260.   _________________________________________________________________________________________________________
  261.    • AUXWINDHANDLE
  262.   _________________________________________________________________________________________________________
  263. }
  264.     AuxWinRecPtr = ^AuxWinRec;
  265.     AuxWinPtr                            = ^AuxWinRec;
  266.     AuxWinHandle                        = ^AuxWinPtr;
  267.     AuxWinRec = RECORD
  268.         awNext:                    AuxWinHandle;                            { handle to next AuxWinRec }
  269.         awOwner:                WindowPtr;                                { ptr to window  }
  270.         awCTable:                CTabHandle;                                { color table for this window }
  271.         reserved:                Handle;
  272.         awFlags:                LONGINT;                                { reserved for expansion }
  273.         awReserved:                CTabHandle;                                { reserved for expansion }
  274.         awRefCon:                LONGINT;                                { user Constant }
  275.     END;
  276.  
  277. {
  278.   _________________________________________________________________________________________________________
  279.    • WSTATEHANDLE
  280.   _________________________________________________________________________________________________________
  281. }
  282.     WStateDataPtr = ^WStateData;
  283.     WStateData = RECORD
  284.         userState:                Rect;                                    { user state }
  285.         stdState:                Rect;                                    { standard state }
  286.     END;
  287.  
  288.     WStateDataHandle                    = ^WStateDataPtr;
  289. {
  290.   _________________________________________________________________________________________________________
  291.       
  292.    • API
  293.   _________________________________________________________________________________________________________
  294. }
  295. PROCEDURE InitWindows;
  296.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  297.     INLINE $A912;
  298.     {$ENDC}
  299. FUNCTION NewWindow(wStorage: UNIV Ptr; {CONST}VAR boundsRect: Rect; title: ConstStr255Param; visible: BOOLEAN; theProc: INTEGER; behind: WindowPtr; goAwayFlag: BOOLEAN; refCon: LONGINT): WindowPtr;
  300.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  301.     INLINE $A913;
  302.     {$ENDC}
  303. FUNCTION GetNewWindow(windowID: INTEGER; wStorage: UNIV Ptr; behind: WindowPtr): WindowPtr;
  304.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  305.     INLINE $A9BD;
  306.     {$ENDC}
  307. FUNCTION NewCWindow(wStorage: UNIV Ptr; {CONST}VAR boundsRect: Rect; title: ConstStr255Param; visible: BOOLEAN; procID: INTEGER; behind: WindowPtr; goAwayFlag: BOOLEAN; refCon: LONGINT): WindowPtr;
  308.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  309.     INLINE $AA45;
  310.     {$ENDC}
  311. PROCEDURE DisposeWindow(theWindow: WindowPtr);
  312.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  313.     INLINE $A914;
  314.     {$ENDC}
  315. PROCEDURE CloseWindow(theWindow: WindowPtr);
  316.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  317.     INLINE $A92D;
  318.     {$ENDC}
  319. PROCEDURE InvalRect({CONST}VAR badRect: Rect);
  320.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  321.     INLINE $A928;
  322.     {$ENDC}
  323. PROCEDURE InvalRgn(badRgn: RgnHandle);
  324.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  325.     INLINE $A927;
  326.     {$ENDC}
  327. PROCEDURE ValidRect({CONST}VAR goodRect: Rect);
  328.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  329.     INLINE $A92A;
  330.     {$ENDC}
  331. PROCEDURE ValidRgn(goodRgn: RgnHandle);
  332.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  333.     INLINE $A929;
  334.     {$ENDC}
  335. FUNCTION CheckUpdate(VAR theEvent: EventRecord): BOOLEAN;
  336.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  337.     INLINE $A911;
  338.     {$ENDC}
  339. PROCEDURE ClipAbove(window: WindowPtr);
  340.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  341.     INLINE $A90B;
  342.     {$ENDC}
  343. PROCEDURE SaveOld(window: WindowPtr);
  344.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  345.     INLINE $A90E;
  346.     {$ENDC}
  347. PROCEDURE DrawNew(window: WindowPtr; update: BOOLEAN);
  348.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  349.     INLINE $A90F;
  350.     {$ENDC}
  351. PROCEDURE PaintOne(window: WindowPtr; clobberedRgn: RgnHandle);
  352.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  353.     INLINE $A90C;
  354.     {$ENDC}
  355. PROCEDURE PaintBehind(startWindow: WindowPtr; clobberedRgn: RgnHandle);
  356.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  357.     INLINE $A90D;
  358.     {$ENDC}
  359. PROCEDURE CalcVis(window: WindowPtr);
  360.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  361.     INLINE $A909;
  362.     {$ENDC}
  363. PROCEDURE CalcVisBehind(startWindow: WindowPtr; clobberedRgn: RgnHandle);
  364.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  365.     INLINE $A90A;
  366.     {$ENDC}
  367. PROCEDURE SetWinColor(theWindow: WindowPtr; newColorTable: WCTabHandle);
  368.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  369.     INLINE $AA41;
  370.     {$ENDC}
  371. PROCEDURE SetDeskCPat(deskPixPat: PixPatHandle);
  372.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  373.     INLINE $AA47;
  374.     {$ENDC}
  375. FUNCTION GetNewCWindow(windowID: INTEGER; wStorage: UNIV Ptr; behind: WindowPtr): WindowPtr;
  376.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  377.     INLINE $AA46;
  378.     {$ENDC}
  379. PROCEDURE SetWTitle(theWindow: WindowPtr; title: ConstStr255Param);
  380.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  381.     INLINE $A91A;
  382.     {$ENDC}
  383. PROCEDURE GetWTitle(theWindow: WindowPtr; VAR title: Str255);
  384.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  385.     INLINE $A919;
  386.     {$ENDC}
  387. PROCEDURE GetWMgrPort(VAR wPort: GrafPtr);
  388.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  389.     INLINE $A910;
  390.     {$ENDC}
  391. PROCEDURE GetCWMgrPort(VAR wMgrCPort: CGrafPtr);
  392.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  393.     INLINE $AA48;
  394.     {$ENDC}
  395. PROCEDURE SetWRefCon(theWindow: WindowPtr; data: LONGINT);
  396.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  397.     INLINE $A918;
  398.     {$ENDC}
  399. FUNCTION GetWRefCon(theWindow: WindowPtr): LONGINT;
  400.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  401.     INLINE $A917;
  402.     {$ENDC}
  403. PROCEDURE SelectWindow(theWindow: WindowPtr);
  404.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  405.     INLINE $A91F;
  406.     {$ENDC}
  407. PROCEDURE HideWindow(theWindow: WindowPtr);
  408.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  409.     INLINE $A916;
  410.     {$ENDC}
  411. PROCEDURE ShowWindow(theWindow: WindowPtr);
  412.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  413.     INLINE $A915;
  414.     {$ENDC}
  415. PROCEDURE ShowHide(theWindow: WindowPtr; showFlag: BOOLEAN);
  416.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  417.     INLINE $A908;
  418.     {$ENDC}
  419. PROCEDURE HiliteWindow(theWindow: WindowPtr; fHilite: BOOLEAN);
  420.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  421.     INLINE $A91C;
  422.     {$ENDC}
  423. PROCEDURE BringToFront(theWindow: WindowPtr);
  424.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  425.     INLINE $A920;
  426.     {$ENDC}
  427. PROCEDURE SendBehind(theWindow: WindowPtr; behindWindow: WindowPtr);
  428.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  429.     INLINE $A921;
  430.     {$ENDC}
  431. FUNCTION FrontWindow: WindowPtr;
  432.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  433.     INLINE $A924;
  434.     {$ENDC}
  435. PROCEDURE DrawGrowIcon(theWindow: WindowPtr);
  436.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  437.     INLINE $A904;
  438.     {$ENDC}
  439. PROCEDURE MoveWindow(theWindow: WindowPtr; hGlobal: INTEGER; vGlobal: INTEGER; front: BOOLEAN);
  440.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  441.     INLINE $A91B;
  442.     {$ENDC}
  443. PROCEDURE SizeWindow(theWindow: WindowPtr; w: INTEGER; h: INTEGER; fUpdate: BOOLEAN);
  444.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  445.     INLINE $A91D;
  446.     {$ENDC}
  447. PROCEDURE ZoomWindow(theWindow: WindowPtr; partCode: INTEGER; front: BOOLEAN);
  448.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  449.     INLINE $A83A;
  450.     {$ENDC}
  451. PROCEDURE BeginUpdate(theWindow: WindowPtr);
  452.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  453.     INLINE $A922;
  454.     {$ENDC}
  455. PROCEDURE EndUpdate(theWindow: WindowPtr);
  456.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  457.     INLINE $A923;
  458.     {$ENDC}
  459. PROCEDURE SetWindowPic(theWindow: WindowPtr; pic: PicHandle);
  460.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  461.     INLINE $A92E;
  462.     {$ENDC}
  463. FUNCTION GetWindowPic(theWindow: WindowPtr): PicHandle;
  464.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  465.     INLINE $A92F;
  466.     {$ENDC}
  467. FUNCTION GrowWindow(theWindow: WindowPtr; startPt: Point; {CONST}VAR bBox: Rect): LONGINT;
  468.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  469.     INLINE $A92B;
  470.     {$ENDC}
  471. FUNCTION FindWindow(thePoint: Point; VAR theWindow: WindowPtr): INTEGER;
  472.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  473.     INLINE $A92C;
  474.     {$ENDC}
  475. FUNCTION PinRect({CONST}VAR theRect: Rect; thePt: Point): LONGINT;
  476.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  477.     INLINE $A94E;
  478.     {$ENDC}
  479. FUNCTION DragGrayRgn(theRgn: RgnHandle; startPt: Point; {CONST}VAR limitRect: Rect; {CONST}VAR slopRect: Rect; axis: INTEGER; actionProc: DragGrayRgnUPP): LONGINT;
  480.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  481.     INLINE $A905;
  482.     {$ENDC}
  483. FUNCTION DragTheRgn(theRgn: RgnHandle; startPt: Point; {CONST}VAR limitRect: Rect; {CONST}VAR slopRect: Rect; axis: INTEGER; actionProc: DragGrayRgnUPP): LONGINT;
  484.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  485.     INLINE $A926;
  486.     {$ENDC}
  487. FUNCTION TrackBox(theWindow: WindowPtr; thePt: Point; partCode: INTEGER): BOOLEAN;
  488.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  489.     INLINE $A83B;
  490.     {$ENDC}
  491. FUNCTION TrackGoAway(theWindow: WindowPtr; thePt: Point): BOOLEAN;
  492.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  493.     INLINE $A91E;
  494.     {$ENDC}
  495. PROCEDURE DragWindow(theWindow: WindowPtr; startPt: Point; {CONST}VAR boundsRect: Rect);
  496.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  497.     INLINE $A925;
  498.     {$ENDC}
  499. FUNCTION GetWVariant(theWindow: WindowPtr): INTEGER;
  500.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  501.     INLINE $A80A;
  502.     {$ENDC}
  503. FUNCTION GetAuxWin(theWindow: WindowPtr; VAR awHndl: AuxWinHandle): BOOLEAN;
  504.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  505.     INLINE $AA42;
  506.     {$ENDC}
  507. FUNCTION GetGrayRgn: RgnHandle;
  508.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  509.     INLINE $2EB8, $09EE;
  510.     {$ENDC}
  511. {
  512.   _________________________________________________________________________________________________________
  513.       
  514.    • PROCS
  515.   _________________________________________________________________________________________________________
  516. }
  517.  
  518.  
  519. TYPE
  520.     WindowDefProcPtr = ProcPtr;  { FUNCTION WindowDef(varCode: INTEGER; theWindow: WindowPtr; message: INTEGER; param: LONGINT): LONGINT; }
  521.  
  522.     DeskHookProcPtr = Register68kProcPtr;  { PROCEDURE DeskHook(mouseClick: BOOLEAN; VAR theEvent: EventRecord); }
  523.  
  524.     WindowDefUPP = UniversalProcPtr;
  525.     DeskHookUPP = UniversalProcPtr;
  526.  
  527. CONST
  528.     uppWindowDefProcInfo = $00003BB0;
  529.     uppDeskHookProcInfo = $00130802;
  530.  
  531. FUNCTION NewWindowDefProc(userRoutine: WindowDefProcPtr): WindowDefUPP;
  532.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  533.     INLINE $2E9F;
  534.     {$ENDC}
  535.  
  536. FUNCTION NewDeskHookProc(userRoutine: DeskHookProcPtr): DeskHookUPP;
  537.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  538.     INLINE $2E9F;
  539.     {$ENDC}
  540.  
  541. FUNCTION CallWindowDefProc(varCode: INTEGER; theWindow: WindowPtr; message: INTEGER; param: LONGINT; userRoutine: WindowDefUPP): LONGINT;
  542.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  543.     INLINE $205F, $4E90;
  544.     {$ENDC}
  545.  
  546. PROCEDURE CallDeskHookProc(mouseClick: BOOLEAN; VAR theEvent: EventRecord; userRoutine: DeskHookUPP);
  547.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  548.     {To be implemented:  Glue to move parameters into registers.}
  549.     {$ENDC}
  550. {
  551.   _________________________________________________________________________________________________________
  552.       
  553.    • C GLUE
  554.   _________________________________________________________________________________________________________
  555. }
  556. {
  557.   _________________________________________________________________________________________________________
  558.       
  559.    • WindowRecord accessor macros
  560.   _________________________________________________________________________________________________________
  561. }
  562. {
  563.     *****************************************************************************
  564.     *                                                                           *
  565.     * The conditional STRICT_WINDOWS has been removed from this interface file. *
  566.     * The accessor macros to a WindowRecord are no longer necessary.            *
  567.     *                                                                           *
  568.     * All ≈Ref Types have reverted to their original Handle and Ptr Types.      *
  569.     *                                                                           *
  570.     *****************************************************************************
  571.  
  572.     Details:
  573.     The original purpose of the STRICT_ conditionals and accessor macros was to
  574.     help ease the transition to Copland.  Shared data structures are difficult
  575.     to coordinate in a preemptive multitasking OS.  By hiding the fields in a
  576.     WindowRecord and other data structures, we would begin the migration to the
  577.     discipline wherein system data structures are completely hidden from
  578.     applications.
  579.     
  580.     After many design reviews, we finally concluded that with this sort of
  581.     migration, the system could never tell when an application was no longer
  582.     peeking at a WindowRecord, and thus the data structure might never become
  583.     system owned.  Additionally, there were many other limitations in the
  584.     classic toolbox that were begging to be addressed.  The final decision was
  585.     to leave the traditional toolbox as a compatibility mode.
  586.     
  587.     We also decided to use the Handle and Ptr based types in the function
  588.     declarations.  For example, NewWindow now returns a WindowPtr rather than a
  589.     WindowRef.  The Ref types are still defined in the header files, so all
  590.     existing code will still compile exactly as it did before.  There are
  591.     several reasons why we chose to do this:
  592.     
  593.     - The importance of backwards compatibility makes it unfeasible for us to
  594.     enforce real opaque references in the implementation anytime in the
  595.     foreseeable future.  Therefore, any opaque data types (e.g. WindowRef,
  596.     ControlRef, etc.) in the documentation and header files would always be a
  597.     fake veneer of opacity.
  598.     
  599.     - There exists a significant base of books and sample code that neophyte
  600.     Macintosh developers use to learn how to program the Macintosh.  These
  601.     books and sample code all use direct data access.  Introducing opaque data
  602.     types at this point would confuse neophyte programmers more than it would
  603.     help them.
  604.     
  605.     - Direct data structure access is used by nearly all Macintosh developers. 
  606.     Changing the interfaces to reflect a false opacity would not provide any
  607.     benefit to these developers.
  608.     
  609.     - Accessor functions are useful in and of themselves as convenience
  610.     functions, without being tied to opaque data types.  We will complete and
  611.     document the Windows and Dialogs accessor functions in an upcoming release
  612.     of the interfaces.
  613. }
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621. {$ALIGN RESET}
  622. {$POP}
  623.  
  624. {$SETC UsingIncludes := MacWindowsIncludes}
  625.  
  626. {$ENDC} {__MACWINDOWS__}
  627.  
  628. {$IFC NOT UsingIncludes}
  629.  END.
  630. {$ENDC}
  631.